package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmy.cultivate.entity.LackCourseLog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.respons.LackCourseLogRs;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 缺课记录 服务类
 * </p>
 *
 * @author hpiggy
 * @since 2023-07-28
 */
public interface ILackCourseLogService extends IService<LackCourseLog> {
    /**
     * 查询缺课记录
     *
     * @param page
     * @param wrapper
     * @return
     */
    public abstract IPage<LackCourseLog> getLackCourseLog(Page<LackCourseLog> page, Wrapper wrapper);

    /**
     * 修改安排状态
     *
     * @param isRepair
     * @param id
     * @return
     */
    public abstract Boolean updateRemarkBoolean(Integer isRepair, Long repairId, Long id);

    /**
     *
     * @param yearPart
     * @param quarterNum
     * @param schoolId 校区id
     * @param studentId 学生id
     * @param yearClassId 年级id
     * @param yearClassId
     * @param gradeId
     * @param type 1正常排课，5转课
     * @return
     */
    public abstract boolean batchAdd(Integer yearPart, Integer quarterNum, Long schoolId, Long studentId, Long subjectsId, Integer yearClassId, Long gradeId,Integer type,Integer lackType);

    boolean addLackCourseLogBatch(Integer yearPart, Integer quarterNum, Long schoolId, Long studentId, Long subjectsId, Integer yearClassId, Long gradeId, Integer type);

    public abstract LackCourseLog getLackCoruseLogForStudent(Integer yearPart, Integer quarterNum, Long studentId, Long subjectsId, Integer lessonNum);

    Integer getLackCourseForNum(Integer yearPart, Integer quarterNum, Long studentId, Long subjectsId, Integer lessonNum, Integer lessonType);

    IPage<LackCourseLogRs> lackStudentList(IPage<?> page, Integer yearPart, Integer quarterNum, String schoolId, String yearClassId, String gradeId, String subjectsId, String teacherId, String classTypeId, String lackType, String studentName, String idStr);

    Boolean updateLackTypeBoolean(Integer lackType, Long gradeId, Long studentId, Integer yearPart, Integer quarterNum);

    Boolean cancelLackBoolean(Long gradeId, Long studentId, Integer yearPart, Integer quarterNum);

    Boolean cancelRepairCourseBoolean(Long gradeId, Long studentId, Integer yearPart, Integer quarterNum);

}
